from sklearn.datasets import load_digits
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score


if __name__ == '__main__':
    digits = load_digits()
    X, y = digits.data, digits.target
    lr = LogisticRegression(max_iter=3000)
    lr.fit(X, y)
    print(accuracy_score(y, lr.predict(X)))
